package com.jumi.microservice.domain.vo;

import com.jumi.microservice.common.base.AbstractObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * - - - - - - - - - - - - - - -
 *
 * @author liuz
 * @date 2020/7/20 15:57
 * ToDoSomeThing
 * - - - - - - - - - - - - - - -
 */
@ApiModel(value="Priority对象", description="权限表")
public class PriorityVO extends AbstractObject implements Serializable {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "权限标识符")
    @Length(max = 15, message = "菜单名称长度不能超过15个字符")
    private String priorityCode;

    @ApiModelProperty(value = "菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    @Length(max = 10, message = "菜单名称长度不能超过10个字符")
    private String priorityName;

    @ApiModelProperty(value = "菜单类型，模块:module,目录:directory,菜单:menu,按钮:button")
    @NotBlank(message = "菜单类型不能为空")
    private String priorityType;

    @ApiModelProperty(value = "菜单图标")
    private String icon;

    @ApiModelProperty(value = "排序")
    @Range(min = 0,max = 999, message = "排序的取值范围0-999")
    private Integer orderNum;

    @ApiModelProperty(value = "路由地址")
    @NotBlank(message = "路由地址不能为空")
    private String path;

    @ApiModelProperty(value = "父权限ID")
    @NotBlank(message = "上级菜单不能为空")
    private Integer parentId;

    @ApiModelProperty(value = "状态，1启用，0.禁用")
    private Integer status;

    @ApiModelProperty(value = "添加人")
    private String creater;

    @ApiModelProperty(value = "添加时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "添加开始时间")
    private String startTimeAdd;

    @ApiModelProperty(value = "添加结束时间")
    private String endTimeAdd;

    @ApiModelProperty(value = "修改开始时间")
    private String startTimeUp;

    @ApiModelProperty(value = "修改结束时间")
    private String endTimeUp;

    @ApiModelProperty(value = "子菜单列表")
    List<PriorityVO> children;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPriorityCode() {
        return priorityCode;
    }

    public void setPriorityCode(String priorityCode) {
        this.priorityCode = priorityCode;
    }

    public String getPriorityName() {
        return priorityName;
    }

    public void setPriorityName(String priorityName) {
        this.priorityName = priorityName;
    }

    public String getPriorityType() {
        return priorityType;
    }

    public void setPriorityType(String priorityType) {
        this.priorityType = priorityType;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getStartTimeAdd() {
        return startTimeAdd;
    }

    public void setStartTimeAdd(String startTimeAdd) {
        this.startTimeAdd = startTimeAdd;
    }

    public String getEndTimeAdd() {
        return endTimeAdd;
    }

    public void setEndTimeAdd(String endTimeAdd) {
        this.endTimeAdd = endTimeAdd;
    }

    public String getStartTimeUp() {
        return startTimeUp;
    }

    public void setStartTimeUp(String startTimeUp) {
        this.startTimeUp = startTimeUp;
    }

    public String getEndTimeUp() {
        return endTimeUp;
    }

    public void setEndTimeUp(String endTimeUp) {
        this.endTimeUp = endTimeUp;
    }

    public List<PriorityVO> getChildren() {
        return children;
    }

    public void setChildren(List<PriorityVO> children) {
        this.children = children;
    }
}
